import {
  CHANGETREEID,
  RENEW,
  SETUSERINFO,CLEARUSERINFO,
  SETROUTER,
  SETCURUMB,
} from '@/redux/constant';
//
export const changeCheckTree = (data) => ({ type: CHANGETREEID, data });
//此处就是异步action  返回一个函数，在返回的函数中写异步操作就行
export const renewPosition = (data) => {
  return (dispatch) => {
    setTimeout(() => {
      dispatch({ type: RENEW, data });
    }, 500);
  };
};

//用户信息操作
export const setUserInfo = (data) => ({ type: SETUSERINFO, data });
export const clearUserInfo = (data) => ({ type: CLEARUSERINFO, data });

//路由
export const setRouter = (data)=>({type:SETROUTER,data});

//面包屑处理
export const setCrumb = (data)=>({type:SETCURUMB,data})
